Skip to content

Added file for curry hw#5

Open
DolzhenkoAlexa wants to merge 2 commits intomainfrom
HW/Curry/Dolzhenko
Open

Added file for curry hw#5
DolzhenkoAlexa wants to merge 2 commits intomainfrom
HW/Curry/Dolzhenko

Conversation

@DolzhenkoAlexa
Copy link
Owner

Добавлен файл curry.py для домашнего задания "Каррирование"

Comment on lines +2 to +5
if type(arity) != int:
raise TypeError("Ошибка: Арность должна быть целым числом (int)")
if arity < 0:
raise ValueError("Ошибка: Арность должна быть положительной")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не проверяется случай, когда пользователь указывает арность не соответствующую реальной.
Мы можем написать f_curry = curry(sum3, 100), ошибка появится только при вызове функции f_curry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants